﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CUiDisAutomaticDisassemblyCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Resources;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands;

public class CUiDisAutomaticDisassemblyCmd : TxButtonCommand
{
  private CUiDisAutomaticDisassemblyEnabler m_commandEnabler;
  private const string RESOURCE_TABLE_PATH = "DnProcessSimulateCommands.AutomaticDisassembly.ResourceTable";

  public CUiDisAutomaticDisassemblyCmd()
  {
    this.m_commandEnabler = new CUiDisAutomaticDisassemblyEnabler();
  }

  public virtual void Execute(object cmdParams)
  {
    if (!CUiDisAutomaticDisassemblyEnabler.AreCommandConditionsMet())
      return;
    new CUiDisAutomaticDisassemblyForm(CUiDisAutomaticDisassemblyForm.SequenceGenerationMode.Disassembly).Show(CUiDisAutomaticDisassemblyEnabler.GetSelectedOperation());
  }

  public virtual string Bitmap => "AutomaticDisassembly.AutoDisassembly.bmp";

  public virtual string LargeBitmap => "AutomaticDisassembly.AutoDisassembly_LARGE.png";

  public virtual string Category
  {
    get => this.GetResourceManger().GetString("AUTOMATIC_DISASSEMBLY_CMD_CATEGORY");
  }

  public virtual string Description
  {
    get => this.GetResourceManger().GetString("AUTOMATIC_DISASSEMBLY_CMD_DESCRIPTION");
  }

  public virtual string Name
  {
    get => this.GetResourceManger().GetString("AUTOMATIC_DISASSEMBLY_CMD_NAME");
  }

  public virtual string Tooltip
  {
    get => this.GetResourceManger().GetString("AUTOMATIC_DISASSEMBLY_CMD_DESCRIPTION");
  }

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.m_commandEnabler;

  private ResourceManager GetResourceManger()
  {
    return new ResourceManager("DnProcessSimulateCommands.AutomaticDisassembly.ResourceTable", ((object) this).GetType().Assembly);
  }

  public virtual bool Licensed => TxCommandLicenser.AutomaticDysassemblyLicense;
}
